<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>教师管理</title>
</head>
<body>
<%@include file="admindex.jsp"%>
	<table class="table table-dark"
		style="margin-left: 15%; margin-right: 15%; width: 70%;">
		<thead>
			<tr>
				<th scope="col">教工号</th>
				<th scope="col">教师姓名</th>
				<th scope="col">性别</th>
				<th scope="col">学历</th>
				<th scope="col">职称</th>
				<th scope="col">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="t" items="${tPage.list }">
				<tr>
					<th scope="row">${t.tno }</th>
					<td>${t.tname }</td>
					<td>${t.tsex }</td>
					<td>${t.teb }</td>
					<td>${t.tpt }</td>
					<td><a href="delteacher?id=${t.id }" class="btn btn-primary btn-lg active" role="button"
			aria-pressed="true" style="background-color: #c00;border-color: #c00;">删除</a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>

	<nav aria-label="Page navigation example">
	<ul class="pagination" style="margin-top: 20px; margin-left: 40%;">
		<c:if test="${tPage!=null }">
			<c:if test="${tPage.pageNum>1 }">
				<li class="page-item"><a class="page-link"
					href="findAllStudent?pageNum=1&&pageSize=${tPage.pageSize }">首页</a></li>
				<li class="page-item"><a class="page-link"
					href="findAllStudent?pageNum=${tPage.prePageNum}&&pageSize=${tPage.pageSize }">${tPage.prePageNum}</a></li>
			</c:if>
			<li class="page-item"><a class="page-link">${tPage.pageNum}</a></li>
			<c:if test="${tPage.pageNum<tPage.totalPageNum }">
				<li class="page-item"><a class="page-link"
					href="findAllStudent?pageNum=${tPage.nextPageNum}&&pageSize=${tPage.pageSize }">${tPage.nextPageNum}</a></li>
				<li class="page-item"><a class="page-link"
					href="findAllStudent?pageNum=${tPage.totalPageNum}&&pageSize=${tPage.pageSize }">尾页</a></li>
			</c:if>
		</c:if>
		<p class="lead" style="margin-left: 33%;">当前页：第${tPage.pageNum }页/共${tPage.totalPageNum }页</p>
		<a href="addteacher.jsp" class="btn btn-primary btn-lg active" role="button"
			aria-pressed="true">添加教师</a>
	</ul>
	</nav>
</body>
</html>